import Vue from 'vue'
import Vuex from 'vuex'
// import createPersistedState from 'vuex-persistedstate'

// 引入模块
import app from './modules/app'
import permission from './modules/permission'
import tagsView from './modules/tagsView'
import user from './modules/user'
import settings from './modules/settings'
import errorLog from './modules/errorLog'
// getters
import getters from './getters'

// const allState = createPersistedState({
//   paths: ['app', 'permission', 'tagsView', 'user', 'settings', 'errorLog']
// })

Vue.use(Vuex)
const store = new Vuex.Store({
  modules: {
    app,
    permission,
    tagsView,
    user,
    settings,
    errorLog,
  },
  getters,
  // plugins: [allState]
})

export default store
